#!/usr/bin/env python3
#-*- encoding:utf-8 -*-

import grpc
import add_pb2
import add_pb2_grpc

unix_path = "/tmp/go-add.sock"


def run():
    # NOTE(gRPC Python Team): .close() is possible on a channel and should be
    # used in circumstances in which the with statement does not fit the needs
    # of the code.
    with grpc.insecure_channel('unix://' + unix_path) as channel:
        stub = add_pb2_grpc.AddStub(channel)
        response = stub.Add(add_pb2.AddRequest(a=3, b=5))
    print(response.message)


if __name__ == '__main__':
    run()
